﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace array_one_cycle
{
    class Program
    {
        static void Main(string[] args)
        {
            string group1 = " ";
            string group2 = " ";
            string group3 = " ";
            int[] numbers = new int[10] { 1, 3, 5, 7, 10, 12, 15, 18, 24, 48 };

            foreach (int i in numbers)
            {
                if (i % 2 == 0)
                {
                    group1 = group1 + i  + " ";
                   
                }
                if (i % 3 == 0)
                {
                    group2 = group2 + i + " ";
                    
                }
                if (i%2==0 && i%3==0)
                { group3 = group3 + i + " "; }
            }
            Console.WriteLine("делятся на 2:"+group1);
            Console.WriteLine("делятся на 3:" + group2);
            Console.WriteLine("делятся и на 2 и на 3:" + group3);
            
                        System.Console.ReadLine();
        }
    }
}
